import emitter from 'tiny-emitter/instance';

/**
 * 全局事件
 */
export const $event = {
    $on: (...args) => emitter.on(...args),
    $once: (...args) => emitter.once(...args),
    $off: (...args) => emitter.off(...args),
    $emit: (...args) => emitter.emit(...args),
}
// 使用
//
// import {$event} from "@/common/util/event";
// $event.$emit('refreshPan',{})
//全局监听-刷新
// this.$event.$on('refreshPan', (data) => {
//     //console.log("全局监听-刷新-refreshPan")
// this.refreshPan()
// })